package cn.schoolwow.quickdao.module.database.parent.kit;

import cn.schoolwow.quickdao.domain.QuickDAOConfig;
import cn.schoolwow.quickflow.QuickFlow;
import cn.schoolwow.quickflow.domain.FlowContext;

/**
 * 数据库操作实例
 */
public class DatabaseDAOImpl implements DatabaseDAO {
    /**
     * 流程执行器
     * */
    protected QuickFlow quickFlow;

    /**
     * 数据库配置对象
     */
    protected QuickDAOConfig quickDAOConfig;

    public DatabaseDAOImpl(QuickFlow quickFlow) {
        this.quickFlow = quickFlow;
        this.quickDAOConfig = quickFlow.getContextInstanceData(QuickDAOConfig.class);
    }

    protected int getEffect(FlowContext flowContext){
        return (int) flowContext.checkData("effect");
    }
}
